/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.munchkinquest.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author stephen
 */
@Entity
@Table(name = "STEPNOTE", schema="APP")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Stepnote.findAll", query = "SELECT s FROM Stepnote s"),
    @NamedQuery(name = "Stepnote.findById", query = "SELECT s FROM Stepnote s WHERE s.id = :id"),
    @NamedQuery(name = "Stepnote.findByStepid", query = "SELECT s FROM Stepnote s WHERE s.stepid = :stepid order by s.displayorder"),
    @NamedQuery(name = "Stepnote.findByNoteid", query = "SELECT s FROM Stepnote s WHERE s.noteid = :noteid"),
    @NamedQuery(name = "Stepnote.findByDisplayorder", query = "SELECT s FROM Stepnote s WHERE s.displayorder = :displayorder")})
public class Stepnote implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID")
    private Long id;
    @Basic(optional = false)
    @NotNull
    @Column(name = "STEPID")
    private long stepid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "NOTEID")
    private long noteid;
    @Column(name = "DISPLAYORDER")
    private Long displayorder;

    public Stepnote() {
    }

    public Stepnote(Long id) {
        this.id = id;
    }

    public Stepnote(Long id, long stepid, long noteid) {
        this.id = id;
        this.stepid = stepid;
        this.noteid = noteid;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getStepid() {
        return stepid;
    }

    public void setStepid(long stepid) {
        this.stepid = stepid;
    }

    public long getNoteid() {
        return noteid;
    }

    public void setNoteid(long noteid) {
        this.noteid = noteid;
    }

    public Long getDisplayorder() {
        return displayorder;
    }

    public void setDisplayorder(Long displayorder) {
        this.displayorder = displayorder;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Stepnote)) {
            return false;
        }
        Stepnote other = (Stepnote) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.munchkinquest.model.Stepnote[ id=" + id + " ]";
    }
    
}
